package com.virus.server.utils;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;

import java.io.IOException;

public class ContextXmlUtils {

    private static Document document;

    static {
        String context = null;
        try {
            context = FileUtils.readUTF8(Constant.contextXml);
        } catch (IOException e) {
            e.printStackTrace();
        }
        if (context != null){
            document = Jsoup.parse(context);
        }
    }

    public static String parseContext() {
        return document.select("watchedResource").first().text();
    }
}
